home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00115_Script_advant_button < prev    next >
Text File  |  1999-04-25  |  3KB  |  131 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14.  
  15. property mySprite, NeutralName, RolloverName, startAnimation, maxSlideSpeed,AnimationIsOver,planeName,slideSpeed,memberCount
  16.  
  17.  
  18.  
  19. on new me
  20.   
  21.   set startAnimation = FALSE
  22.   set AnimationIsOver = FALSE
  23.   set maxSlideSpeed = 0
  24.   set mySprite = the spriteNum of me
  25.   
  26.   set NeutralName = getNeutralName(me, mySprite)
  27.   set RolloverName = NeutralName&"-rol"
  28.   set planeName = "bja"
  29.   
  30. end
  31.  
  32. on getPlaneName me
  33.   set Name = NeutralName
  34.   repeat with i =  the Number of Chars in Name down to 1
  35.     if char i of Name <> "_" then 
  36.       delete char i of Name
  37.     else
  38.       delete char i of Name
  39.       exit repeat
  40.     end if
  41.   end repeat
  42.   
  43.   return Name
  44.   
  45. end
  46.  
  47.  
  48. on mouseEnter me
  49.   if not AnimationIsOver then
  50.     set the member of sprite mySprite = member  RolloverName
  51.     if startAnimation = FALSE then puppetsound 3, "mouse2a"
  52.   end if
  53.   
  54. end
  55.  
  56. on mouseLeave me
  57.   if not AnimationIsOver then
  58.     set the member of sprite mySprite = member  NeutralName
  59.   end if
  60.   
  61. end
  62.  
  63. on mouseUp me
  64.   set startAnimation = TRUE
  65.   set memberCount = 1
  66.   set slideSpeed = 0
  67.   puppetsound 3,"hydmach"
  68. end
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75. on getNeutralName me,SpriteNum
  76.   
  77.   set aMember = the member of sprite spriteNum
  78.   set Name = the name of member aMember
  79.   if Name contains "-" then
  80.     repeat with i = the Number of Chars of Name down to 1
  81.       if char i of Name <> "-" then 
  82.         delete char i of Name
  83.       else
  84.         delete char i of Name
  85.         exit repeat
  86.       end if
  87.     end repeat
  88.   end if
  89.   
  90.   
  91.   return Name
  92.   
  93. end
  94.  
  95.  
  96. on exitFrame me
  97.   global menuController
  98.   
  99.   if startAnimation then
  100.     slideButton me 
  101.   end if
  102.   if AnimationIsOver then
  103.     deselect menuController
  104.     sound stop 2
  105.     sound stop 1
  106.     
  107.     go to "advantages"
  108.   end if
  109.   
  110. end
  111.  
  112.  
  113.  
  114. on slideButton me
  115.   set the stretch of sprite mySprite = FALSE
  116.   if slideSpeed >= maxSlideSpeed then
  117.     set slideSpeed = 0
  118.     set the member of sprite mySprite = memberCount&"-"&planeName
  119.     updatestage
  120.     --    put the member of sprite mySprite
  121.     set memberCount = memberCount+1
  122.     if memberCount >= 17 then 
  123.       set startAnimation = FALSE 
  124.       set AnimationIsOver = TRUE
  125.     end if
  126.   end if
  127.   set slideSpeed = slideSpeed+1
  128. end
  129.  
  130.  
  131.